/*
 * @Author: XieQiu 雪球
 * @Date: 2021-05-12 16:59:31
 * @LastEditTime: 2021-05-18 08:54:12
 * @LastEditors: XieQiu 雪球
 * @Description: 巡检点管理接口
 */
import xjaxios from "@/api/axios";

export default {
  /**
   * @description: 获取巡检点名称列表 *代表必填
   * @param {String/Number} page *
   * @param {String/Number} size *
   * @param {Object} entity {componyId: 1} *
   * @param {String} order 排序方式 ASC DESC 默认ASC
   * @param {String} sort 自定义排序方式 'createTime'
   * @return {Array}
   */
  getInspectionPointList(params) {
    return xjaxios.post("/v3/patrol/inspectionPoint/queryPageList", params);
  },
  /**
   * @description: 获取单个巡检点信息
   * @return {Object}
   */
  getInspectionPointById(id) {
    return xjaxios.get(`/v3/patrol/inspectionPoint/query/${id}`);
  },
  /**
   * @description: 新增巡检点信息
   * @param {Object} formData *
   * @return {Object}
   */
  addInspectionPointInfo(formData) {
    formData.organizationNo = sessionStorage.organizationNo
    return xjaxios.post("/v3/patrol/inspectionPoint/add", formData);
  },
  /**
   * @description: 编辑巡检点信息
   * @param {Object} formData *
   * @return {Object}
   */
  editInspectionPointInfo(formData) {
    formData.organizationNo = sessionStorage.organizationNo
    return xjaxios.post("/v3/patrol/inspectionPoint/edit", formData);
  },
  /**
   * @description: 批量删除数据
   * @param {Array} list *
   * @return {Object}
   */
  delInspectionPointInfo(list) {
    return xjaxios.post("/v3/patrol/inspectionPoint/delList", {
      inspectionPointIdList: list
    });
  }
};
